<template>
	<view class="boxShade">
		<view class="bigBox">
			<view class="selectMember">
				<view class="memberBox">
					<view class="member" @click="editId ? dialog = false : dialog = true">
						<image src="../../../static/img/quickly/information/add@2x.png"></image>
						<text>{{userName || '选择会员'}}</text>
					</view>
					<view class="save" @click="seveAdd(1)">保存</view>
					<view class="toSend" @click="seveAdd(2)">签名发送</view>
				</view>
			</view>
			<u-collapse :accordion="accordion" style="margin: -38px 12px 0;width:351px;background-color: #F8F8F8; overflow: hidden; box-sizing: border-box;"  @change="collapseChange">
			    <u-collapse-item :title="item.name" :class="item.name == '中医四诊-望' ? 'hopeClass' : item.name == '中医四诊-闻' ? 'smellClass' : 'cutClass'" v-for="(item,index) in collapseData" :key="index" style="margin-top: 30upx;" :show-animation="true">
			        <view class="theTitle one" v-for="(aitem,aindex) in item.data" :key="aindex">
			            <view class="one">
							<view>{{aindex+1}}</view>
							<span>{{aitem.title}}</span>
						</view>
						<view class="selectBox">
							<view :class="!aitem.options[0].option?'allTitle':'allTitle2'" v-for="(itemTow,indexTow) in aitem.options" :key="indexTow" >
								<view v-if="!aitem.options[0].option"  @click="statusTCM == 1 || statusTCM == null ? check(itemTow,aindex,index,indexTow) : ''">
									<image :src="itemTow.checked ? '../../../static/img/questionnaire/checked.png':'../../../static/img/questionnaire/noChecked.png'" class="checked"></image>
									<span>{{itemTow.title}}</span>
								</view>
								<view v-else>
									<view class="">
										<span>{{itemTow.smallTitle}}</span>
									</view>
									<view class="selectBoxTwo">
										<view v-for="(bitem,bindex) in aitem.options[indexTow].option" :key="bindex" class="allTitle" @click="statusTCM == 1 || statusTCM == null ? check2(index,bindex,aindex,bitem,indexTow) : ''">
											<image :src="bitem.checked ? '../../../static/img/questionnaire/checked.png':'../../../static/img/questionnaire/noChecked.png'" class="checked"></image>
											<span>{{bitem.title}}</span>
										</view>
									</view>
								</view>
							</view>
						</view>
			        </view>
				</u-collapse-item>
			</u-collapse>
				
			<view class="ask" style="margin:15px 12px 0 12px;"  @click="tcmDetails">
				<text>中医四诊-问</text>
				<text>
					<image src="../../../static/img/quickly/tcm/addQuestion.png"></image>
				</text>
			</view>
				
			<view style="margin:0 12px; width: 351px;" v-if="defaultArr">
				<table class="table" id="poster">
					<tr>
						<td>体质类型</td>
						<td>转化分数</td>
						<td>分数对应</td>
					</tr>
					<tr v-for="(item,index) in defaultArr"  :key="index">
						<td>{{item.typeName}}</td>
						<td>{{item.score}}</td>
						<td>{{item.result}}</td>
					</tr>
				</table>
				
				<!-- 转化人 -->
				<view class="userInformation">
					<view>
						<span>转化人：</span>{{userName}}
					</view>
					<view>
						<span>转化日期：</span>{{createdDate ? shijiantime(createdDate) : ''}}
					</view>
				</view>
			</view>
				
			<!-- 修正转化分 -->
			<view style="margin:0 12px; width: 351px;">
				<view v-if="isAmended && isAmended == 2" >
					<p class="identification">
						<img src="../../../static/img/questionnaire/title@2x.png" alt=""><span>(修正后)</span>
					</p>
					<table class="table" id="poster3">
						<tr>
							<td>体质类型</td>
							<td>转化分数</td>
							<td>分数对应</td>
						</tr>
						<tr v-for="(item,index) in appPhysiqueScoreEntitiesvoHealthSort"  :key="index">
							<td>{{item.typeName}}</td>
							<td :style="{color:item.dissimilarity?'#f00':''}">{{item.healthScore}}</td>
							<td :style="{color:item.dissimilarity?'#f00':''}">{{item.healthResult}}</td>
						</tr>
					</table>
				</view>
				
				<!-- 转化人 -->
				<view class="userInformation" v-if="signDate ||isAmended && isAmended == 2 ">
					<view>
						<span>体检人：</span>{{healthName}}
					</view>
					<view>
						<span>体检日期：</span>{{signDate ? signDate : ''}}
					</view>
				</view>
			</view>
				
			<!-- 查看详情 -->
			<view class="details">
				<view class="look" @click="checkCorrect">查看修正转化分</view>
				<view class="sureScore" v-if="!signDate" @click="scoreSure">确认分数</view>
			</view>

		</view>
		<view class="choose">
			<navigator url="/pages/quickly/tcm/criteria" class="criterion">判定标准</navigator>
			<view class="t">体质判定</view>
			<view class="nav">
				<text v-for="(b,bindex) in physicalArr" :key="bindex" :class="b.checked?'on':''" @click="physicalChoose(b.typeName,bindex,b)">{{b.typeName}}</text>
			</view>
			<view class="allClear">
				<view class="clear" @click="clear()">
					<image src="../../../static/img/questionnaire/clear.png"></image>
					清除全部
				</view>
				<view class="show">
					<view>为：<span :class="aa?'on':''" @click="chooseNo('1')">{{criterionArr[0]}}</span>体质</view>
					<view v-show="show1">以：<span :class="firstFocus?'on':''" @click="chooseNo('2')">{{criterionArr[1]}}</span>为主</view>
					<view v-show="show2">兼：<span :class="secondFocus?'on':''" @click="chooseNo('3')">{{criterionArr[2]}}</span>体质</view>
					<view v-show="show3">有：<span :class="threeFocus?'on':''" @click="chooseNo('4')">{{criterionArr[3]}}</span>倾向</view>
				</view>
			</view>

		</view>
		<div id="poster2" style="position: fixed;z-index: -1;">
			<image :src="base64" alt="" style="width: 100vw;" mode="widthFix">
			<div id="main" :style="{ height: '300px'}"></div>
		</div>
		<image :src="base64Two" alt="" style="width: 100vw;position: fixed;z-index: -1;" mode="widthFix"></image>
		<!-- 会员弹框 -->
		<member :dialog.sync="dialog"  @hidedialog="hidedialog" @chooseUser="chooseUser"></member>
		<u-modal v-model="showModal" :show-cancel-button="true" @confirm="Modalconfirm" :content="showContent"></u-modal>
		<u-modal v-model="showModal1" :show-cancel-button="true" @confirm="showModal1 = false" :content="showContent1"></u-modal>
	</view>
</template>

<script src="@/static/js/quickly/tcm/createTcm.js">
</script>

<style lang="scss" scoped>
	@import '@/static/css/quickly/tcm/createTcm.scss';
</style>
